import 'package:equatable/equatable.dart';
import 'package:mobile_app.core/core/domain/entities/settings/training_settings_data.dart';

class LearningSettingsData extends Equatable {
  const LearningSettingsData({
    required this.autoPronunciationEnabled,
    required this.trainingSettingsData,
  });

  final bool autoPronunciationEnabled;
  final TrainingSettingsData trainingSettingsData;

  @override
  List<Object?> get props {
    return [
      autoPronunciationEnabled,
      trainingSettingsData,
    ];
  }

  LearningSettingsData copyWith({
    bool Function()? autoPronunciationEnabled,
    TrainingSettingsData Function()? trainingSettingsData,
  }) {
    return LearningSettingsData(
      autoPronunciationEnabled: autoPronunciationEnabled == null
          ? this.autoPronunciationEnabled
          : autoPronunciationEnabled(),
      trainingSettingsData:
          trainingSettingsData == null ? this.trainingSettingsData : trainingSettingsData(),
    );
  }
}
